package com.xia.mail;

import java.util.concurrent.Callable;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Transport;

public class SendMailOverTimeCheckImplement implements Callable<String> {

	Message mailMessage;

	public void sendMails() {
		try {
			Transport.send(mailMessage);
		} catch (MessagingException e) {
			e.printStackTrace();
		}
	}

	public SendMailOverTimeCheckImplement(Message mailMessage) {
		this.mailMessage = mailMessage;
	}

	public String call() throws Exception {
		sendMails();
		return "邮件发送完毕了";
	}

}
